document.addEventListener('DOMContentLoaded', function () {
  const username = document.querySelector('.username');
  const password = document.querySelector('.password');
  const login = document.querySelector('.login');
  login.addEventListener('click', function (e) {
    e.preventDefault();
    if (username.value === 'admin' && password.value === '123456') {
      location.href = 'http://47.116.207.219/homePage';
    } else {
      document.querySelector('form').reset();
      alert('用户名或密码错误');
    }
  });
});